Add Regexp#=== to match and =~ comparison#62
Closed
JuanitoFatas wants to merge 1 commit intomasterfrom
Closed
Conversation
Contributor
|
Confirm Weird, I could have sworn I saw it faster earlier |
Collaborator
|
Hmm, yea very little in it. They do different things too, with Regexp#=== returning a boolean (which is handy, as before I knew that I used |
Contributor
|
String#=~ is |
Collaborator
|
Same benchmark: Mine has the lowest standard deviation @ ± 4.3%, also higher IPS Edit: Ran it again, got similar to #59 (comment) but higher IPS: |
Contributor
Author
|
Merged in 69c1ed1. Thanks everyone. |
|
Got to add |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow up of #59
On my machine
String#=~is faster thanRegexp#===.What do you guys think?
/cc @Arcovion @schneems
schneems/rails@1bf50ba#commitcomment-12572839
schneems/rails@752432e